<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="恢复TiDB备份资源中的单个或多个表">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="TiDB_00041.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
  <meta name="DC.Publisher" content="20240320">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="TiDB_00045">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>恢复TiDB备份资源中的单个或多个表</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="TiDB_00045"></a><a name="TiDB_00045"></a>
  <h1 class="topictitle1">恢复TiDB备份资源中的单个或多个表</h1>
  <div>
   <p>当需要恢复TiDB备份资源中的某个或多个表时，可以参考本节进行操作。</p>
   <div class="section">
    <h4 class="sectiontitle">背景信息</h4>
    <p>支持使用集群或数据库类型的备份副本、复制副本（复制副本不支持恢复至原位置）进行原位置或新位置恢复。</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">前提条件</h4>
    <ul id="TiDB_00045__tidb_00044_ul132661420141115">
     <li id="TiDB_00045__tidb_00044_li762383391617">恢复前请确认恢复目标位置正确。</li>
     <li id="TiDB_00045__tidb_00044_li7712113644310">恢复前请确保恢复目标位置的数据目录剩余空间大于恢复副本缩减前大小</li>
     <li id="TiDB_00045__tidb_00044_li5441111618120">执行恢复任务前，请关闭TiDB日志备份开关。恢复任务完成后，重新打开该开关，开启和关闭的操作方法请参见<a href="TiDB_00072.html">在生产环境开启或关闭日志备份开关</a>。</li>
     <li id="TiDB_00045__tidb_00044_li16230658087">集群需保持同样的时钟源配置。</li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">操作步骤</h4>
    <ol>
     <li><span>选择<span class="uicontrol" id="TiDB_00045__tidb_00040_zh-cn_topic_0000001839142377_uicontrol548619473589">“<span id="TiDB_00045__tidb_00040_zh-cn_topic_0000001839142377_text44861447115812">数据利用</span> &gt; <span id="TiDB_00045__tidb_00040_zh-cn_topic_0000001839142377_text2048614765813">副本数据</span> &gt; <span id="TiDB_00045__tidb_00040_zh-cn_topic_0000001839142377_text163101122194918">数据库</span> &gt; TiDB”</span>。</span></li>
     <li><span>您可以以TiDB备份资源维度或以副本维度查找副本，本节以资源维度为例进行说明。</span><p></p><p>在“资源”页签，根据备份资源名称查找到需要恢复的备份资源，并单击备份资源名称。</p>
      <div class="note">
       <img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span>
       <div class="notebody">
        <p>仅资源类型为集群或数据库的副本可选择表级恢复。</p>
       </div>
      </div> <p></p></li>
     <li><span>在<span class="uicontrol">“<span>副本数据</span>”</span>页签，依次选择年、月、天找到副本。</span><p></p><p>当时间上显示<span><img src="zh-cn_image_0000001839224157.png"></span>，即表示该月、该天存在副本。</p> <p></p></li>
     <li><span>单击<span><img src="zh-cn_image_0000001839144201.png"></span>，在副本所在行单击<span class="uicontrol">“<span>更多</span> &gt; <span>表级恢复</span>”</span>。</span></li>
     <li><span>在<span class="uicontrol">“<span>表级恢复</span>”</span>页面左侧框勾选要恢复的表。</span></li>
     <li><span>在<span class="uicontrol">“<span>表级恢复</span>”</span>页面右侧，单击<span class="uicontrol">“<span>请选择</span>”</span>，选择需要恢复到的目标位置后单击<span class="uicontrol">“确定”</span>。</span><p></p><p>相关参数说明如<a href="#TiDB_00045__table194961441141219">表1</a>所示。</p>
      <div class="tablenoborder">
       <a name="TiDB_00045__table194961441141219"></a><a name="table194961441141219"></a>
       <table cellpadding="4" cellspacing="0" summary="" id="TiDB_00045__table194961441141219" frame="border" border="1" rules="all">
        <caption>
         <b>表1 </b>恢复TiDB表
        </caption>
        <colgroup>
         <col style="width:32.019999999999996%">
         <col style="width:67.97999999999999%">
        </colgroup>
        <thead align="left">
         <tr>
          <th align="left" class="cellrowborder" valign="top" width="32.019999999999996%" id="mcps1.3.4.2.6.2.2.2.3.1.1"><p>参数</p></th>
          <th align="left" class="cellrowborder" valign="top" width="67.97999999999999%" id="mcps1.3.4.2.6.2.2.2.3.1.2"><p>说明</p></th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.6.2.2.2.3.1.1 "><p><span>恢复至</span></p></td>
          <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.6.2.2.2.3.1.2 "><p>选择恢复至<span class="uicontrol">“<span>原位置</span>”</span>或<span class="uicontrol">“<span>新位置</span>”</span>。</p></td>
         </tr>
         <tr>
          <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.6.2.2.2.3.1.1 "><p><span>目标集群</span></p></td>
          <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.6.2.2.2.3.1.2 "><p>当选择恢复至<span class="uicontrol">“<span>新位置</span>”</span>时，请选择恢复到的目标TiDB集群。</p>
           <div class="note">
            <span class="notetitle"> 说明： </span>
            <div class="notebody">
             <ul>
              <li>从高版本数据库恢复到低版本数据库，可能会恢复失败，请查询TiDB官方文档确认数据库版本的兼容情况。</li>
             </ul>
            </div>
           </div></td>
         </tr>
         <tr>
          <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.4.2.6.2.2.2.3.1.1 "><p><span>是否删除重名表</span></p></td>
          <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.4.2.6.2.2.2.3.1.2 "><p>通过该参数选择是否删除重名表。表级恢复时，当选择了该选项，ProtectAgent代理主机默认会删除和原副本中重名的表。</p>
           <div class="note">
            <span class="notetitle"> 说明： </span>
            <div class="notebody">
             <p id="TiDB_00045__tidb_00044_p147141414193715">当存在重名表时，不选择删除重名表将导致恢复失败，请慎重选择。</p>
            </div>
           </div></td>
         </tr>
        </tbody>
       </table>
      </div> <p></p></li>
     <li><span>单击<span class="uicontrol">“确定”</span>。</span></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="TiDB_00041.html">恢复</a>
    </div>
   </div>
  </div>
 </body>
</html>